﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using RookieGrow.Domain.Model.SportsStore;
using RookieGrow.Data.SportsStore.Map;

namespace RookieGrow.Data.SportsStore
{
    public class SportsDbContext : DbContext
    {
        public SportsDbContext(string connectionString)
            : base(connectionString)
        {
        }

        public DbSet<Product> Products { get; set; }
        
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            // Entity Type Configuration
            modelBuilder.Configurations.Add(new ProductMap());
        }
    }
}
